<?php
/* $Id$ */
$pMediaAuthor = ScribbleAuth::authorize(ScribbleSession::getUser(), 'media-author');
?>

<h3>Create a Folder</h3>
<?php if($pMediaAuthor): ?>
	<form method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?>">
		<dl>
			<dt>Enter the folder name:</dt>
			<dd><input type="text" class="text" name="dn" value="" /></dd>
			<dd><button class="submit" type="submit" value="Create">Create</button></dd>
		</dl>
	</form>
<?php else: ?>
	<p class="warning">
		You do not have permission to create new folders in the media library.
	</p>
<?php endif; ?>

<h3>Upload a File</h3>
<?php if($pMediaAuthor): ?>
	<form method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?>" enctype="multipart/form-data">
		<dl>
			<dt>Select a file to upload:</dt>
			<dd><input type="file" name="fn" size="10" /></dd>
			<dd><button class="submit" type="submit" value="Upload">Upload</button></dd>
		</dl>
	</form>
<?php else: ?>
	<p class="warning">
		You do not have permission to upload new files to the media library.
	</p>
<?php endif; ?>